home *** CD-ROM | disk | FTP | other *** search
- 0, In this demonstration, you will see how to set up
- 4, the State University database on Microsoft SQL
- 7, Server 6.5 and Microsoft Access. To set up the
- 11, database on Microsoft SQL Server, open the SQL Enterprise
- 15, Manager, and connect to the SQL Server that you
- 17, will install State University on. The first time you
- 20, connect to your SQL Server, you will have to
- 22, register it in the SQL Enterprise Manager by choosing
- 25, Server, Register Server. In the Register Server
- 30, dialog box, type in the name of your server, and type
- 34, in a valid login and password for the server.
- 39, Then click the Register button to register the server,
- 42, and close the dialog box. The server will show up
- 46, in the SQL Enterprise Manager. Expand it by
- 49, clicking the plus sign next to the name. Next, you need
- 56, to create a new database device for the State
- 58, University database. Right-click on the database
- 61, devices folder, and choose New Device. In the New
- 66, Database Device dialog box, type in the name for the
- 69, new database device, which is StateU, and set an
- 74, initial size of 5MB. Choose Create Now to create
- 79, the device. When the device is created, it will show
- 84, up in the database devices folder as StateU.
- 89, Next, you need to create a new database using the
- 91, StateU device you just created. Right-click on the
- 94, databases folder, and select New Database. In the
- 99, New Database dialog box, type in the name of the
- 101, database, which is StateU. Select the device of
- 107, StateU, and set the size to 5MB, then click Create
- 113, Now to create the database. When the database is
- 117, created, it will show up in the databases folder. The
- 127, initial database is empty, so now you must fill
- 129, it with the tables and records that make up the
- 132, State University database. The Mastering Web Site
- 134, Development CD provides a SQL script file in the Lab
- 138, 3 directory, which will install all of the State
- 140, University data into the new database. To run the
- 144, SQL script, select SQL Query Tool from the Tools
- 147, menu. Then open the SQL file. The file name is
- 157, stateu.sql. Once it's loaded, click the Play button.
- 165, While the script executes, all of the tables, stored
- 168, procedures, and data for State University are
- 171, entered into the StateU database. When the Play
- 174, button returns to a green color, the script is finished,
- 177, and the State University database is ready for
- 179, use. Now that State University is set-up on SQL
- 185, Server, you will need to add an ODBC System DSN to any
- 189, computers that will connect to the database. To
- 192, do this, open the ODBC Data Source Administrator on
- 196, the computer that will connect to State
- 197, University. You can do this from the control panel. In the
- 201, Data Source Administrator, click on the System DSN
- 204, tab, then choose Add to add a new data source.
- 209, Since this is a SQL Server database, choose SQL
- 211, Server, and then click Finish. Then fill in all
- 218, pertinent information about the StateU data source. I'll
- 222, give it the same name as the database. I'll type
- 225, in a description, type in the name of the server,
- 236, and lastly, type in the name of the database by
- 239, clicking on the Options button. When you're
- 244, finished, click on the OK button, and the data source will
- 247, be created. To set-up the Microsoft Access version
- 254, of State University, all you have to do is share
- 256, the State University database from a central file
- 259, server. The Microsoft Access version of State
- 262, University, stateu.mdb, is provided with the Mastering
- 266, Web Site Development CD in the Lab 3 directory.
- 269, Simply copy it to its own directory. I'll copy it
- 272, to a directory called Database. Then share that
- 277, directory out by right-clicking on it, and
- 279, selecting Sharing. In the Sharing dialog box, I'll share
- 287, this out as Database. Make sure that the file isn't
- 294, marked as read-only by right-clicking on it, and
- 296, choosing Properties. Now that the Microsoft Access
- 308, version of State University is set up, you'll need
- 311, to add an ODBC System DSN to any computers that
- 314, will connect to the database. To do this, open the
- 317, ODBC Data Source Administrator on the computer
- 320, that will connect to State University. Go to the
- 327, System DSN tab, and click on Add to add a new data
- 330, source. Since this is a Microsoft Access database,
- 334, select the Microsoft Access driver and click
- 337, Finish. In the dialog box, fill in the data source name
- 343, and description. Then you need to select the
- 351, database over the network. Click on the Select button
- 354, to do this. Then click on the Network button to
- 359, establish the network connection, and type in the name
- 362, of the server and the path name. Go to the server,
- 374, and then select the stateu.mdb file, and click OK.
- 379, Finally, click OK on the dialog box, and the
- 382, System DSN is created. Now that you have set up State
- 388, University on either SQL Server or Microsoft
- 391, Access, you can create data-aware Web pages to work with
- 395, the database.
- 396, END